package com.renjian.tool;

import org.xml.sax.SAXException;

import com.renjian.util.MyContentHandler;

public class UserHandler extends MyContentHandler {

	public void endElement(String uri, String localName, String name)
			throws SAXException {
		if (name.equals("id")) {
			logger.log(buffer.toString());
			user.id = buffer.toString();
		} else if (name.equals("name")) {
			user.name = buffer.toString();
		} else if (name.equals("screen_name")) {
			user.screen_name = buffer.toString();
		} else if (name.equals("description")) {
			user.description = buffer.toString();
		} else if (name.equals("profile_image_url")) {
			user.profile_image_url = buffer.toString();
		} else if (name.equals("url")) {
			user.url = buffer.toString();
		} else if (name.equals("protected")) {
			user.isProtected = buffer.toString();
		} else if (name.equals("created_at")) {
			user.created_at = buffer.toString();
		} else if (name.equals("followers_count")) {
			user.followers_count = buffer.toString();
		} else if (name.equals("following_count")) {
			user.following_count = buffer.toString();
		} else if (name.equals("favourites_count")) {
			user.favourites_count = buffer.toString();
		} else if (name.equals("is_followed_me")) {
			user.is_followed_me = buffer.toString();
		} else if (name.equals("is_following")) {
			user.is_following = buffer.toString();
		} else if (name.equals("score")) {
			user.score = buffer.toString();
		} else if (name.equals("gender")) {
			user.gender = buffer.toString();
		}
	}

}
